<script setup>
import {useRoute} from "vue-router";
import store from "@/store/index.js";

const route = useRoute();

</script>


<template>
<h4 style="margin-bottom: 20px">住户基本信息</h4>
  <el-form label-width="90px">
    <div class="form-item">
      <el-form-item label="姓名"  class="is-required" style="width: 700px">
        <el-input v-model="route.query.realName"/>
      </el-form-item>
      <el-form-item label="电话" class="is-required" style="width: 700px">
        <el-input v-model="route.query.id"/>
      </el-form-item>
    </div>
    <div class="form-item">
      <el-form-item label="性别" class="is-required" style="width: 700px">
        <el-select v-model="route.query.sex">
          <el-option label="男" value="男"/>
          <el-option label="女" value="女"/>
        </el-select>
      </el-form-item>
    </div>
    <div class="form-item">
      <el-form-item label="证件类型" style="width: 700px">
        <el-select v-model="route.query.sex">
          <el-option label="身份证" value="身份证"/>
          <el-option label="驾驶证" value="驾驶证"/>
        </el-select>
      </el-form-item>
      <el-form-item label="证件号码" style="width: 700px">
        <el-input v-model="route.query.id"/>
      </el-form-item>
    </div>
    <div class="form-item">
      <el-form-item label="备注" style="width: 100%">
        <el-input type="textarea"/>
      </el-form-item>
    </div>
  </el-form>

  <span><h4>相关房屋</h4> <el-button type="primary" @click="">新增房屋</el-button></span>
  <!-- 表格 -->
  <el-table border style="width: 100%">
    <el-table-column fixed type="index" label="序号" width="60"/>
    <el-table-column prop="username" label="小区"/>
    <el-table-column prop="realName" label="房屋"/>
    <el-table-column prop="phone" label="住户类型"/>
    <el-table-column prop="nickName" label="住户状态" width="150"/>
    <el-table-column fixed="right" label="操作">
      <template #default="scope">
        <el-button type="primary" size="small" @click="">详情</el-button>
        <el-button type="primary" size="small" @click="">修改</el-button>
        <el-button type="danger" size="small" @click="">删除</el-button>
      </template>
    </el-table-column>
  </el-table>

  <span><el-button type="primary" @click="">保存住户基本信息</el-button> <el-button  @click="">返回</el-button></span>

</template>

<style scoped>
span{
  display: flex;
  margin: 20px 0;
  line-height: 30px;
  h4{
    margin-right: 10px;
  }
}
.form-item {
  text-align: right;
  display: flex;
  justify-content: space-between;
}
</style>
